package day0803;

import java.util.Scanner;

public class test02 {
    public static void main(String[] args) {
        System.out.println("输入:");
        int n=new Scanner(System.in).nextInt();
        System.out.println(new S().sum(n));

    }

}
class S{
    public  int sum(int n) {
        if (n <= 1) {
            return 1;
        }
        return sum(n - 1) * n;
    }
}